package Stack_Queue.queue;

import Stack_Queue.queue.Impl.LoopQueue;

//循环队列测试类
public class LoopTest {
    public static void main(String[] args) {
        Queue<Integer> queue = new LoopQueue(5);
        LoopQueue myQueue = (LoopQueue) queue;
        for (int i = 0; i < 5; i++) {
            myQueue.offer(i + 1);
        }
        System.out.println(myQueue);
        System.out.println(myQueue.peek() + "he" + myQueue.last());
        System.out.println(myQueue.poll());
        myQueue.offer(6);
        System.out.println(myQueue);
    }
}
